Use matching MPI datatype for size_t reduction#142
Merged
romerojosh merged 2 commits intoJun 22, 2026
Conversation
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
Collaborator
|
/build |
|
🚀 Build workflow triggered! View run |
|
✅ Build workflow passed! View run |
romerojosh
reviewed
Jun 17, 2026
romerojosh
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for another contributinon @fallintoplace! Changes look good to me but there are two other locations that use the old MPI_LONG_LONG_INT that should be updated to use this new utility function before landing.
https://github.com/NVIDIA/cuDecomp/blob/main/src/autotune.cc#L267
https://github.com/NVIDIA/cuDecomp/blob/main/src/autotune.cc#L723
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
Collaborator
|
LGTM! Thanks for the contribution @fallintoplace! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the NVSHMEM allocation-size reduction in
cudecompMallocto use an MPI datatype that matches the actualsize_ttypedef.The previous code reduced
buffer_size_bytesdirectly withMPI_LONG_LONG_INT. That is ABI-sensitive becausebuffer_size_bytesissize_t, which may beunsigned long,unsigned long long, or another unsigned integer type depending on the platform.This PR adds a small internal helper that maps
size_tto the matching unsigned MPI datatype before theMPI_Allreduce. It also updates the adjacent warning message to printbuffer_size_byteswith%zu.Tests
git diff --checkMPI_LONG_LONG_INTuses; the ones inautotune.ccreduceint64_tvalues, notsize_tLocal formatter/build/test execution was not available in this checkout because
clang-format,nvcc, andmpicxxare not installed.